<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TabContainer Demo - noLayout</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>

<script type="text/javascript">
	var djConfig = { isDebug: true };
</script>
<script type="text/javascript" src="../../dojo.js"></script>
<script type="text/javascript">
	dojo.require("dojo.widget.TabContainer");
	dojo.require("dojo.widget.Tooltip");
	dojo.require("dojo.widget.LinkPane");
	dojo.require("dojo.widget.ContentPane");
	dojo.require("dojo.widget.Button");
</script>

<style type="text/css">
body {
	font-family : sans-serif;
}

/* add padding to each contentpane inside the tab container, and scrollbar if necessary */
.dojoTabPane {
  padding : 10px 10px 10px 10px;
  overflow: auto;
}

#FixedSizeRule .dojoTabPaneWrapper {
	height: 300px;
	overflow: auto;
}

</style>
<script type="text/javascript">
function boo(panel, node) {
	node.innerHTML = "Handlers override grabbing from URLs. They run in context of the widget, so 'this' refers to the tab widget.";
}
function testClose(pane,tab) {
  return confirm("Please confirm that you want tab "+tab.label+" closed");
}
</script>
</head>

<body>
	<p>
	This tests tabs in doLayout=false mode, in which case the tab container's height ==
	the height of the currently selected tab.
	</p>
	<p>With doLayout=false mode tabs to the left or right are not supported and tabs at the bottom are a bit buggy in FireFox.
	</p>


	<!-- 1ST TABCONTAINER -->

	<div id="mainTabContainer" dojoType="TabContainer" doLayout="false" selectedChild="tab2">
	
		<div id="tab1" dojoType="ContentPane" href="tab1.html" label="Tab 1"></div>
		
		<div id="tab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" label="Tab 2"></div>
		
		<div dojoType="ContentPane" label="Tab 3">
			<h1>I am tab 3</h1>
			<p>And I was already part of the page! That's cool, no?</p>
			<p id="foo">tooltip on this paragraph</p>
			<div dojoType="Tooltip" connectId="foo">I'm a tooltip!</div>
			<button dojoType="Button">I'm a button</button>
			<br>
			<button dojoType="Button">So am I!</button>
			<p>
			Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
			semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin
			porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi.
			Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis.
			Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae
			risus.
			</p>
			<p>Aliquam vitae enim. Duis scelerisque metus auctor est venenatis
			imperdiet. Fusce dignissim porta augue. Nulla vestibulum. Integer lorem
			nunc, ullamcorper a, commodo ac, malesuada sed, dolor. Aenean id mi in
			massa bibendum suscipit. Integer eros. Nullam suscipit mauris. In
			pellentesque. Mauris ipsum est, pharetra semper, pharetra in, viverra
			quis, tellus. Etiam purus. Quisque egestas, tortor ac cursus lacinia,
			felis leo adipiscing nisi, et rhoncus elit dolor eget eros. Fusce ut
			quam. Suspendisse eleifend leo vitae ligula. Nulla facilisi. Nulla
			rutrum, erat vitae lacinia dictum, pede purus imperdiet lacus, ut
			semper velit ante id metus. Praesent massa dolor, porttitor sed,
			pulvinar in, consequat ut, leo. Nullam nec est. Aenean id risus blandit
			tortor pharetra congue. Suspendisse pulvinar.
			</p>
		</div>
		
		<div dojoType="LinkPane" label="Handler tab" handler="boo"></div>

		<div dojoType="ContentPane" label="Another Tab">
			<h1>I love local content</h1>
			<p>And I'm not ashamed to admit it.</p>
			<p>venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga
			venga venga venga venga venga venga venga venga venga venga venga venga</p>
		</div>

		<div id="subTabContainer" dojoType="TabContainer" label="Sub TabContainer" doLayout="false" closeButton="tab">
			<a dojoType="LinkPane" href="tab1.html">SubTab 1</a>		
			<a dojoType="LinkPane" href="tab2.html" selected="true">SubTab 2</a>
		</div>

	</div>

	<p>
	Some text here.  This should appear directly below the TabContainer,
	and the position will change based on the current height of the TabContainer.
	</p>

	<p>The following TabContainer has a fixed height set in CSS - see how FixedSizeRule is used in this page.
 It also uses the per-tab close button feature - setting tabCloseButton per widget.</p>


	<!-- 2ND TABCONTAINER -  -->

	<div id="FixedSizeRule">
		<div id="TabContainerFixedHeight" dojoType="TabContainer" doLayout="false">
			<a dojoType="LinkPane" href="tab1.html">SubTab 1</a>		
			<a dojoType="LinkPane" href="tab2.html" selected="true" tabCloseButton="true">SubTab 2</a>
			<div dojoType="ContentPane" label="Tab 3">
				<h1>I am tab 3</h1>
				<p>And I was already part of the page! That's cool, no?</p>
				<p id="foo">tooltip on this paragraph</p>
				<div dojoType="Tooltip" connectId="foo">I'm a tooltip!</div>
				<button dojoType="Button">I'm a button</button>
				<br>
				<button dojoType="Button">So am I!</button>
				<p>
				Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin
				porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi.
				Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis.
				Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae
				risus.
				</p>
				<p>Aliquam vitae enim. Duis scelerisque metus auctor est venenatis
				imperdiet. Fusce dignissim porta augue. Nulla vestibulum. Integer lorem
				nunc, ullamcorper a, commodo ac, malesuada sed, dolor. Aenean id mi in
				massa bibendum suscipit. Integer eros. Nullam suscipit mauris. In
				pellentesque. Mauris ipsum est, pharetra semper, pharetra in, viverra
				quis, tellus. Etiam purus. Quisque egestas, tortor ac cursus lacinia,
				felis leo adipiscing nisi, et rhoncus elit dolor eget eros. Fusce ut
				quam. Suspendisse eleifend leo vitae ligula. Nulla facilisi. Nulla
				rutrum, erat vitae lacinia dictum, pede purus imperdiet lacus, ut
				semper velit ante id metus. Praesent massa dolor, porttitor sed,
				pulvinar in, consequat ut, leo. Nullam nec est. Aenean id risus blandit
				tortor pharetra congue. Suspendisse pulvinar.
				</p>
			</div>
			<div dojoType="ContentPane" label="Another Tab" tabCloseButton="true">
				<h1>I love local content</h1>
				<p>And I'm not ashamed to admit it.</p>
				<p>venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga
				venga venga venga venga venga venga venga venga venga venga venga venga</p>
			</div>	
		</div>
	</div>

	<p>The following TabContainer has the tabs at the bottom.</p>

	<!-- 3RD TABCONTAINER -->

	<div id="TabContainerBottom" dojoType="TabContainer" labelPosition="bottom" doLayout="false">	
		<a dojoType="LinkPane" href="tab1.html">SubTab 1</a>		
		<a dojoType="LinkPane" href="tab2.html" selected="true">SubTab 2</a>
	</div>
	<p><small>OOOPS in FireFox this shouldnt be next to the tab.</small></p>

	<br><br>
	<p>And they lived happily ever after. The end.</p>

</body>
</html>